import { http } from "./http";

/** 获取百度云token */
export function getToken() {
    return http.get('/bdy_token');
}

/** 上传文件 */
export function uploadFile(file: File,type: string) {
    const formData = new FormData();
    formData.append('file', file);
    formData.append('english', type);
    return http.post('/contract_review', formData, {
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    });
}

/** 合同类型 */
export function contractType() {
    return http.post('/contract_types');
}